package com.jzo2o.health.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jzo2o.health.model.domain.ReservationSetting;
import com.jzo2o.health.model.dto.request.ReservationSettingUpsertReqDTO;
import com.jzo2o.health.model.dto.response.ReservationDateResDTO;
import com.jzo2o.health.model.dto.response.ReservationSettingResDTO;

import java.time.LocalDate;
import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author itcast
 * @since 2023-11-01
 */
public interface IReservationSettingService extends IService<ReservationSetting> {
    /**
     * 新增预约设置
     *
     * @param list 预约设置
     */
    void add(List<ReservationSetting> list);

    /**
     * 按月查询预约设置
     *
     * @param date 月份，格式：2019-03
     * @return 预约设置
     */
    List<ReservationSettingResDTO> getReservationSettingByMonth(String date);//参数格式为：2019-03

    /**
     * 根据日期编辑预约数量
     *
     * @param reservationSettingUpsertReqDTO 预约设置编辑请求
     */
    void editNumberByDate(ReservationSettingUpsertReqDTO reservationSettingUpsertReqDTO);

    /**
     * 根据日期查询预约设置
     *
     * @param orderDate 日期
     * @return 预约设置
     */
    ReservationSetting queryByOrderDate(LocalDate orderDate);

    /**
     * 按月查询可预约日期
     *
     * @param month 月份，格式：yyyy-MM
     * @return 可预约日期
     */
    ReservationDateResDTO getReservationDateByMonth(String month);

    /**
     * 更新预约人数，自增1
     *
     * @param id 预约设置id
     * @return 更新结果
     */
    Integer updateReservations(Integer id);
}
